package Server;

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;

/**
 * Initializes the mainWindow's settings and adds the four components menu,
 * logoPanel, componentPanel and textPanel to its layout. Each of those
 * components do have their own layout set.
 * 
 * @returns ServerGUI
 * @author Thomas Felder
 */
public class serverView extends JFrame {
	protected componentPanel cPanel = new componentPanel();
	// private textPanel tPanel = new textPanel();
	private logoPanel lPanel = new logoPanel();
	protected JTextArea txtA_message = new JTextArea(15,10);
	protected JScrollPane server_msg = new JScrollPane(txtA_message);
	protected menu mBar = new menu();

	public serverView() {
		super("FAL: Server");
		initGUI();
	}

	public void initGUI() {
		setSize(300, 550);
		setResizable(false);
		setLayout(new BorderLayout());
		setLocationRelativeTo(null);
		setDefaultCloseOperation(3);
		setJMenuBar(mBar.createMenu());

		add(lPanel, BorderLayout.NORTH);
		add(cPanel, BorderLayout.CENTER);
		add(server_msg, BorderLayout.SOUTH);
		setVisible(true);
	}
}
